package com.dvd.djk.gdjk002;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.*;

import com.dvd.dao.dvd.TDvd;

public class GDJK002Action extends Action {
	
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		return this.search(mapping, form, request, response);

	}

	public ActionForward search(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
	{
		GDJK002Bean bean =(GDJK002Bean)form;
		GDJK002Model model = new GDJK002Model();
		List<TDvd> dvds = model.searchDvdList(bean);
		request.setAttribute("List_TDvd", dvds);
		ActionForward forward = new ActionForward(mapping.findForward("GDJK001").getPath() + "?pageCount=-1");
		return forward;
	}
}
